package com.easy.common.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 秒杀活动商品关联表
 * @TableName seckill_product
 */
@TableName(value ="seckill_product")
@Data
public class SeckillProduct implements Serializable {
    /**
     * 秒杀商品ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关联秒杀活动ID
     */
    @TableField(value = "activity_id")
    private Integer activityId;

    /**
     * 关联商品ID
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 秒杀价（单位：元）
     */
    @TableField(value = "seckill_price")
    private BigDecimal seckillPrice;

    /**
     * 秒杀库存数量
     */
    @TableField(value = "seckill_stock")
    private Integer seckillStock;

    /**
     * 已使用库存数量
     */
    @TableField(value = "stock_used")
    private Integer stockUsed;

    /**
     * 每人限购数量
     */
    @TableField(value = "limit_per_user")
    private Integer limitPerUser;

    /**
     * 状态（1-有效，0-无效）
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(value = "isdel")
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}